<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>添加学生</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
			<script type="text/JavaScript">
					window.onload=show;
			</script>
      <script type="text/javascript" src="__JS__/jQuery/jquery.js"></script>
      <script type="text/javascript" src="__JS__/jshelper.js"></script>
	</head>
	<body>
	<!-- layout::Auth:header::0 -->
    	<div class="container-fluid">
     		<div class="row-fluid">
  			  <!-- layout::Auth:leftmenu::0 -->
              	 <div class="span8">
                    <div class="hero-unit">
                        <h1>添加学生</h1>
                        	  <p style="font-size:12px">当前位置：
                            <a href='__APP__/index/index' class="nowpositionhref">主页</a>>
                            <a href='__URL__/index' class="nowpositionhref">后台管理</a>>
                            <a href='__URL__/classdetail' class="nowpositionhref">教学班管理</a>>
                            <a href='__URL__/classfile/id/<?php echo ($id); ?>' class="nowpositionhref">学生管理</a>>
                            <a href="" class="nowpositionhref">添加学生</a>
                          </p>
                        </div>
                        <table class="table  table-bordered table-striped">
                        	<thead style="background-color:#09F">
                                <tr>
                                    <th colspan="4">学生查询</th>
                                </tr>
                            </thead>
                            <tbody>
                            	 <form method="get" action="__URL__/addstudent/id/<?php echo ($id); ?>">
                            	<tr>
                                	<td><input type="text" name="no" placeholder="学号" style="width:90%"></td>
                                    <td><input type="text" name="cno"placeholder="班级号" style="width:90%" ></td>
                                    <td><input type="text" name="name"placeholder="姓名" style="width:90%"></td>
                                    <td>
                                    	<code>所在院系</code> <select name="dname" style="width:100%">
                                              <option value ></option>
                                                  <?php if(is_array($deplist)): $i = 0; $__LIST__ = $deplist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><option value =	<?php echo ($vo["name"]); ?>><?php echo ($vo["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                         </select>
                                    </td>
                                </tr>
                                <tr>
                                	
                                    <td colspan="4"><input name="submit" type="submit" class="btn btn-info" value="查询" style="width:80px" title="支持模糊查询"></td>
                                </tr>
                            </tbody>
                             </form>
                        </table>
            
                     <form id="form2" name="form2" method="post" action="__URL__/student_add"> 
                     <table  class="table table-bordered table-striped" width="100%">
                     	<thead style="background-color:#09F">
                        	<tr>
                            	<td>
                                	 <input type="button" onClick="javascript:for(var i=0;i<this.form.length;i++)this.form[i].checked=1;" value='全选' class="btn btn-info">&nbsp;&nbsp;
				<input type="button" onClick="javascript:for(var i=0;i<this.form.length;i++)this.form[i].checked=0;" value='取消全选' class="btn btn-primary">&nbsp;&nbsp;
				<input type="button" onClick="javascript:for(var i=0;i<this.form.length;i++)this.form[i].checked=!this.form[i].checked;" class="btn btn-info" value='反选'>  
				<input type="submit" name="Submit" value="添加学生"  align="right" class="btn btn-success pull-right">
                                </td>
                            </tr>
                        </thead>
                     </table>
                             
                    <table width="100%"  class="table table-bordered table-striped">
                            <thead>
                                <tr align="left">
                                    <th>学号</th>
                                    <th>班级号</th>
                                    <th>姓名</th>
                                    <th>权限</th>
                                    <th>院系</th>
                                </tr>
                            </thead>
                            <load href"__PUBLIC__/js/list_show.js">
                            
                            <tbody>
                                <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><tr>
                                    <?php if($vo["isselect"] == 0): ?><td><input type='checkbox' name='no[]' value="<?php echo ($vo["no"]); ?>"><?php echo ($vo["no"]); ?></td>
                                    <?php else: ?>
                                    <td><?php echo ($vo["no"]); ?>(已添加)</td><?php endif; ?>
                                        <td ><?php echo ($vo["cno"]); ?></td><!--班级号-->
                                        <td ><?php echo ($vo["name"]); ?></td><!--姓名-->
                                        <td ><?php echo ($vo["role"]); ?></td><!--权限-->
                                        <td><?php echo ($vo["dname"]); ?></td><!--院系-->
                                        <input type='hidden' name='classid' value=<?php echo ($id); ?>>
                                    </tr><?php endforeach; endif; else: echo "" ;endif; ?>
                            </tbody>
	  </table>
      </form>
      	<p class="navbar-text pull-right"><?php echo ($page); ?></p>
	  </div>	
	</div>
   </div>
   <script src="__JS__/placeholderIEshow.js"></script>
	</body>
</html>